package bookmanage.Opreation;

import bookmanage.Book;
import bookmanage.BookDao;

import java.util.List;
import java.util.Scanner;

//查找指定书籍
public class FindOperation implements IOperation{
    @Override
    public void work() {
        System.out.println("请输入所要查找书籍名称：");
        Scanner scanner = new Scanner(System.in);
        String name = scanner.next();
        BookDao bookDao = new BookDao();
        List<Book> books = bookDao.selectByName(name);
        for (Book book:books){
                System.out.println(book);
            }
    }
}
